Page({
  data: {
    noticeDetail: {}
  },
  onLoad({ id }) {
    if (id) {
      // 发请求，拿到公告详情
      this.getDetail(id)
    }

    const pages = getCurrentPages()
    console.log(pages)
  },
  async getDetail(id) {
    console.log(id)
    const noticeDetail = await wx.$http.get('/announcement/' + id)
    this.setData({ noticeDetail })
  }
})